package com.bigdata.spark.streaming

import org.apache.kafka.clients.consumer.ConsumerConfig
import org.apache.spark.SparkConf
import org.apache.spark.streaming.{Seconds, StreamingContext}

/**
 * @author Gerry chan
 * @version 1.0
 * 2021/01/03
 * 需求一： 黑名单
 */
object SparkStreaming11_Req1_BlackList {
  def main(args: Array[String]): Unit = {
    val sparkConf = new SparkConf().setMaster("local[*]")
      .setAppName("SparkStreaming")

    val ssc = new StreamingContext(sparkConf, Seconds(3))

    val kafkaPara:Map[String, Object] = Map[String, Object](
      ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG -> "192.168.1.115:9092",
      ConsumerConfig.GROUP_ID_CONFIG -> "atguiguNew",
      "key.deserializer" -> "org.apache.kafka.common.serialization.StringDeserializer",
      "value.deserializer" -> "org.apache.kafka.common.serialization.StringDeserializer"
    )
  }

  //广告点击数据
  case class AdClickData(ts:String, area:String, user:String, ad:String)
}
